/* 
 * File:   TUMessage.h
 * Author: arschmitz
 *
 * Created on April 3, 2011, 12:13 PM
 */

#ifndef TUMESSAGE_H
#define	TUMESSAGE_H

/************************\
 * Message Codes
 * type - code - reason
 * 0x00 - Client Request
 *      - 0x00 - Announce, starting connection, text[4] is my recv portNum.
 *      - 0x10 - Send me config file
 *      - 0x11 - Send me config MD5
 *      - 0x12 - Send me config SHA-2
 * 0x01 - Client Acknowledge
 *      - 0x00 - OK, you're recognized
 *
 * 0x10 - Server Request
 * 0x01 - Server Acknowldege
\************************/

class TUMessage: public TUObject {
public:
    TUMessage(int type, int code, const char *text);
    bool operator==(TUObject *other);
    bool operator!=(TUObject *other);
    ~TUMessage();
    int getType();
    int getCode();
    const char *getText();
private:
    int myType;
    int myCode;
    const char *myText;
    int myTextLength;
};

#endif	/* TUMESSAGE_H */

